package com.black.app.mapper.exercise;

import com.black.app.domain.exercise.AppExerciseAction;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.black.app.domain.req.exercise.query.AppExerciseActionQueryReq;
import com.black.app.domain.resp.exercise.AdminExerciseActionResp;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author L
* @description 针对表【app_exercise_action(锻炼系列的各个视频)】的数据库操作Mapper
* @createDate 2024-10-23 16:57:08
* @Entity com.black.app.domain.exercise.AppExerciseAction
*/
public interface AppExerciseActionMapper extends BaseMapper<AppExerciseAction> {

    /**
     * 根据系列id查询对应的锻炼动作
     * @param sId
     * @return
     */
    List<AppExerciseAction> getBySId(Long sId);


    /**
     * 分页查询锻炼动作
     * @param req
     * @return
     */
//    List<AdminExerciseActionResp> paginationQuery(@Param("req") AppExerciseActionQueryReq req);

    /**
     * 根据id查询锻炼动作
     * @param id
     * @return
     */
    AdminExerciseActionResp findById(Long id);

    /**
     * 根据组次id查询对应的锻炼动作
     * @param groupId
     * @return
     */
    List<AdminExerciseActionResp> getByGId(Long groupId);

    /**
     * 根据组次id和动作名称查询对应的动作
     * @param gid
     * @param name
     * @return
     */
    AppExerciseAction findByGIdAndName(@Param("gid") Long gid,@Param("name") String name);

    /**
     * 根据组次id查询对应的动作
     * @param groupId
     * @return
     */
    List<AppExerciseAction> findByGId(Long groupId);
}




